package com.lagou.edu.factory;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * 多例bean
 */
@Component
@Scope(value = "prototype")
public class ScopeOfPrototypeBean {

    @PostConstruct
    public void init() {
        System.out.println("ScopeOfPrototypeBean 初始化方法.....");
    }

    @PreDestroy
    public void destory() {
        System.out.println("ScopeOfPrototypeBean 销毁方法......");
    }
}
